package com.guqj.pattern.factory.purchase;

import com.guqj.pattern.factory.simple.Apple;
import com.guqj.pattern.factory.simple.Banana;
import com.guqj.pattern.factory.simple.Fruits;

public class FruitFactory {

	public Fruits acquireFruit(String type) {
		if ("Apple".equals(type)) {
			return new Apple();
		} else if ("Banana".equals(type)) {
			return new Banana();
		}
		return null;
	}
}
